package com.smart.web.controller.user.gas;


import com.smart.common.core.domain.R;
import com.smart.system.domain.dto.SensorDataWrapperDto;
import com.smart.system.service.IGasRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/gas/uplink")
public class GasMonitorController {

    @Autowired
    private IGasRecordService gasRecordService;

    @PostMapping("/upData")
    public R<Boolean> upData(@RequestBody SensorDataWrapperDto dto){
        return R.ok(gasRecordService.add(dto));
    }
}
